package org.ssh.dao.impl;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;


import org.ssh.dao.IScrapDao;
import org.ssh.pojo.Asset;
import org.ssh.pojo.Scrap;

public class ScrapDao extends BaseDao implements IScrapDao{


	public int change(Scrap scrap,Asset asset) {
		// TODO Auto-generated method stub
		try {
			getHibernateTemplate().saveOrUpdate(scrap);
			getHibernateTemplate().saveOrUpdate(asset);
			return 1;
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		return 0;
	}

}